//
//  extensions.swift
//  WebSocketDemo
//
//  Created by 姬向阳 on 2020/5/9.
//  Copyright © 2020 SUNNYJ. All rights reserved.
//

import SwiftUI

// 使第一响应者注销第一响应,达到隐藏键盘目的
extension UIApplication {
    func endEditing() {
        sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
    }
}
